<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>仓库验收</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="../../../elementUI/index.css">
    <link rel="stylesheet" href="../../../css/index.css">
</head>

<body>
    <div id="app" class="minWidth">
        <div style="margin: 20px 0;">
            <span style="font-weight: bold;font-size: 1rem;">验收信息</span>
        </div>
        <el-form ref="form" :rules="rules" :model="formware">
            <el-descriptions class="margin-top" :column="3" border>
                <el-descriptions-item label="存货地点">
                    <el-form-item prop="Receipt_Type" style="display: flex;" width="150">
                        <el-select :disabled="true" v-model="formware.Receipt_Type" placeholder="请选择存货地点">
                            <el-option v-for="item in options" :disabled="item.disabled" :key="item.value"
                                :label="item.label" :value="item.value">
                            </el-option>
                        </el-select>
                    </el-form-item>
                </el-descriptions-item>
                <el-descriptions-item label="仓库">
                    <el-form-item prop="Store_SerialNumber" style="display: flex;" width="150">
                        <el-select :disabled="true" v-model="formware.Store_SerialNumber" placeholder="请选择仓库">
                            <el-option v-for="item in Wares" :key="item.value" :label="item.label" :value="item.value">
                            </el-option>
                        </el-select>
                    </el-form-item>
                </el-descriptions-item>
            </el-descriptions>
        </el-form>
        <div style="margin: 20px 0;">
            <span style="font-weight: bold;font-size: 1rem;">验收商品信息</span>
        </div>
        <el-table border :data="formware.Children.purchase_receipt_detail" style="width: 100%">
            <el-table-column align="center" prop="Purchase_Order_Detail_SerialNumber" label="商品名称">
                <template v-slot="{row}">
                    <span>{{ArticleName(row.Purchase_Order_Detail_SerialNumber)}}</span>
                </template>
            </el-table-column>
            <el-table-column align="center" prop="Receipt_Quantity" label="商品剩余量"></el-table-column>
            <el-table-column align="center" prop="Amount" label="商品单价"></el-table-column>
            <el-table-column align="center" prop="Expiration_Date" label="商品过期时间">
                <template v-slot="{row}">
                    <el-date-picker value-format="yyyy-MM-dd HH:mm:ss" v-model="row.Expiration_Date" type="datetime" placeholder="选择日期"></el-date-picker>
                </template>
            </el-table-column>
        </el-table>
        <div style="margin: 20px 0;">
            <span style="font-weight: bold;font-size: 1rem;">验收入库信息</span>
        </div>
        <el-table border :data="formAcceptance.Children.purchase_order_detail" style="width: 100%">
            <el-table-column align="center" label="金额">
                <template v-slot="{row}">
                    {{Pricethousands(row.Amount)}}
                </template>
            </el-table-column>
            <el-table-column align="center" prop="Article_Name" label="商品名称">
                <template v-slot="{row}">
                    {{ArticleName(row.Purchase_Order_Detail_SerialNumber)}}
                </template>
            </el-table-column>
            <el-table-column align="center" prop="Brand_Name" label="品牌名称">
                <template v-slot="{row}">
                    {{Brand_Name(row.Purchase_Order_Detail_SerialNumber)}}
                </template>
            </el-table-column>
            <el-table-column align="center" label="商品单价">
                <template v-slot="{row}">
                    {{Pricethousands(row.Article_UnitPrice)}}
                </template>
            </el-table-column>
            <el-table-column align="center" label="总数量">
                <template v-slot="{row}">
                    <el-input :disabled="true" v-model="row.Quantity" />
                </template>
            </el-table-column>
            <el-table-column align="center" label="实到数量" width="210">
                <template v-slot="{row}">
                    <el-input-number @change="ChangeNum" v-model="row.Receipt_Quantity" :min="1"
                            :max="Number(row.Quantity)"></el-input-number>
                </template>
            </el-table-column>
            <el-table-column align="center" prop="Not_Receipt_Quantity" label="未到数量">
            </el-table-column>
            <el-table-column align="center" prop="Shippment_Quantity" label="出库数量">
            </el-table-column>
            <el-table-column align="center" prop="Inventory_Quantity" label="存货数量">
            </el-table-column>
            <el-table-column align="center" label="仓库类型">
                <template v-slot="{row}">
                    <span>{{row.Depot_Type=='0'?'自用仓库':'第三方仓库'}}</span>
                </template>
            </el-table-column>
        </el-table>
        <div style="width: 100%;display: flex;justify-content: center;position: fixed;bottom: 0;">
            <el-button @click="back">取 消</el-button>
            <el-button type="primary" :loading="loading" @click="ModifyGoods()">确 定</el-button>
        </div>
    </div>
    <script type="text/javascript" src="../../../js/jquery-3.6.0.min.js"></script>
    <script type="text/javascript" src="../../../js/jquery.cookie.js"></script>
    <script type="text/javascript" src="../../../js/vue.min.js"></script>
    <script type="text/javascript" src="../../../elementUI/index.js"></script>
    <script type="text/javascript" src="../../../js/utils.js"></script>
    <script type="text/javascript" src="./js/WarehouseAcceptance.js"></script>
</body>

</html>